﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace MyExceptions
{

    [Serializable]
    public class MyErrorException : Exception
    {
        public string ErrorMessage
        {
            get
            {
                return base.Message.ToString();
            }
        }

        public MyErrorException(string errorMessage)
            : base(errorMessage) { }

        public MyErrorException(string errorMessage, Exception innerEx)
            : base(errorMessage, innerEx) { }
    }

    [Serializable]
    public class UserNotFoundException : MyErrorException
    {
            public UserNotFoundException(string errorMessage)
                                         : base(errorMessage) {}

            public UserNotFoundException(string errorMessage, Exception innerEx)
                                         : base(errorMessage, innerEx) {}
    }

    [Serializable]
    public class IncomeActionNotFoundException : MyErrorException
    {
        public IncomeActionNotFoundException(string errorMessage)
            : base(errorMessage) { }

        public IncomeActionNotFoundException(string errorMessage, Exception innerEx)
            : base(errorMessage, innerEx) { }
    }

    [Serializable]
    public class OutcomeActionNotFoundException : MyErrorException
    {
        public OutcomeActionNotFoundException(string errorMessage)
            : base(errorMessage) { }

        public OutcomeActionNotFoundException(string errorMessage, Exception innerEx)
            : base(errorMessage, innerEx) { }
    }

    [Serializable]
    public class IncomeNotValidException : MyErrorException
    {
        public IncomeNotValidException(string errorMessage)
            : base(errorMessage) { }

        public IncomeNotValidException(string errorMessage, Exception innerEx)
            : base(errorMessage, innerEx) { }
    }

    [Serializable]
    public class OutcomeNotValidException : MyErrorException
    {
        public OutcomeNotValidException(string errorMessage)
            : base(errorMessage) { }

        public OutcomeNotValidException(string errorMessage, Exception innerEx)
            : base(errorMessage, innerEx) { }
    }

}
